﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SteerForPoint : SteerBase
{
    public override string CName
    {
        get
        {
            return SteerName.StN_SteerForPoint;
        }
    }
    public Vector3 TagPoint;
    public float arrivalRadius = 1;

    public override Vector3 CalculateForce()
    {
        Vector3 force = Vector3.zero;
        Vector3 toTag = TagPoint - m_pVehicle.Postion;
        float toTagLength = toTag.sqrMagnitude;
        if(toTagLength > arrivalRadius)
        {
            force = toTag - m_pVehicle.m_v3Velocity;
        }
        return force;
    }

    private void Update()
    {
        
    }
}
